package kr.hkit.powerjava.chapter22.work2.Vo;

public class Department {
	private int dptNo;
	private String dptName;
	private int floor;

	public Department(int dptNo, String dptName) {
		super();
		this.dptNo = dptNo;
		this.dptName = dptName;
	}

	public Department(int dptNo, String dptName, int floor) {
		super();
		this.dptNo = dptNo;
		this.dptName = dptName;
		this.floor = floor;
	}

	public int getDptNo() {
		return dptNo;
	}

	public void setDptNo(int dptNo) {
		this.dptNo = dptNo;
	}

	public String getDptName() {
		return dptName;
	}

	public void setDptName(String dptName) {
		this.dptName = dptName;
	}

	public int getFloor() {
		return floor;
	}

	public void setFloor(int floor) {
		this.floor = floor;
	}

	@Override
	public String toString() {
		return String.format("%s\t %s\t %s", dptNo, dptName, floor);
	}

	@Override
	public boolean equals(Object obj) {
		Department dpt = (Department) obj;
		return dptNo == dpt.getDptNo() && dptName == dpt.getDptName();
	}

}
